vpci/msix: remove from table list on detach
authorRoger Pau Monné <roger.pau@citrix.com>
Wed, 26 Oct 2022 12:56:58 +0000 (14:56 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 26 Oct 2022 12:56:58 +0000 (14:56 +0200)
commitc14aea137eab29eb9c30bfad745a00c65ad21066
treee22e4a5cb8cdabf28a7dbb20165964bc018d8513
parent6ccb5e308ceeb895fbccd87a528a8bd24325aa39
vpci/msix: remove from table list on detach

Teardown of MSIX vPCI related data doesn't currently remove the MSIX
device data from the list of MSIX tables handled by the domain,
leading to a use-after-free of the data in the msix structure.

Remove the structure from the list before freeing in order to solve
it.

Reported-by: Jan Beulich <jbeulich@suse.com>
Fixes: d6281be9d0 ('vpci/msix: add MSI-X handlers')
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Release-acked-by: Henry Wang <Henry.Wang@arm.com>
xen/drivers/vpci/vpci.c